/* 头部样式 */
.header {
    height: 80px;
    background: #fff;
    border-bottom: 2px solid #e1251b;
}

.header .container {
    display: flex;
    align-items: center;
    height: 100%;
}

.order-title {
    font-size: 20px;
    font-weight: bold;
    margin-left: 50px;
}

/* 主要内容 */
.main {
    padding: 20px 0;
    background: #f5f5f5;
    padding-bottom: 140px;
}

/* 通用section样式 */
.section-title {
    font-size: 16px;
    font-weight: bold;
    padding: 10px 0;
}

/* 收货地址 */
.address-section {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
}

.address-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.address-item {
    width: 280px;
    height: 140px;
    border: 1px solid #ddd;
    padding: 15px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.address-item:hover {
    border-color: #e1251b;
}

.address-item.active {
    border-color: #e1251b;
    background-color: #fff8f8;
}

.address-info .name-phone {
    margin-bottom: 10px;
}

.address-info .name {
    font-weight: bold;
    margin-right: 10px;
}

.address-info .address-detail {
    color: #666;
    line-height: 1.5;
}

.default-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #e1251b;
    font-size: 12px;
}

.add-address {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
}

.add-icon {
    font-size: 30px;
    margin-bottom: 10px;
}

/* 商品信息 */
.goods-section {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.goods-list {
    margin-top: 15px;
}

.goods-item {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #f5f5f5;
}

.goods-img {
    width: 80px;
    height: 80px;
    margin-right: 20px;
    border: 1px solid #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
}

.goods-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.goods-info {
    flex: 1;
}

.goods-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.goods-spec {
    font-size: 12px;
    color: #999;
}

.goods-price {
    text-align: right;
    margin-left: 20px;
}

.goods-price .price {
    font-size: 16px;
    color: #e1251b;
    font-weight: bold;
    margin-bottom: 5px;
}

.goods-price .count {
    font-size: 12px;
    color: #999;
}

/* 支付方式 */
.payment-section {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
}

.payment-list {
    display: flex;
    gap: 20px;
}

.payment-item {
    width: 180px;
    height: 60px;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.payment-item:hover {
    border-color: #e1251b;
}

.payment-item.active {
    border-color: #e1251b;
    background-color: #fff8f8;
}

/* 选中状态的勾选标记 */
.payment-item.active::after {
    content: "√";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    background-color: #e1251b;
    color: #fff;
    font-size: 12px;
}

.payment-item img {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    object-fit: contain;
}

.payment-name {
    color: #333;
    font-size: 14px;
}

/* 支付方式hover效果 */
.payment-item:hover .payment-name {
    color: #e1251b;
}

/* 选中状态的文字颜色 */
.payment-item.active .payment-name {
    color: #e1251b;
}

/* 订单信息 */
.order-info {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.info-item {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
    font-size: 14px;
}

.info-item .label {
    color: #666;
    margin-right: 20px;
}

.info-item .value {
    color: #333;
    min-width: 100px;
    text-align: right;
}

.info-item.total {
    font-size: 16px;
    color: #e1251b;
    font-weight: bold;
    border-top: 1px solid #f5f5f5;
    padding-top: 10px;
    margin-top: 10px;
}

.info-item.total .label {
    color: #333;
}

.info-item.total .value {
    font-size: 20px;
}

/* 提交订单区域样式 */
.submit-section {
    background: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    height: 120px;
}

/* 左侧信息布局 */
.submit-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

/* 地址确认信息 */
.address-confirm {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 寄送地址 */
.shipping-to {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.shipping-to span {
    color: #333;
}

/* 收货人信息 */
.receiver-info {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.receiver-info span {
    color: #333;
    margin-right: 15px;
}

/* 价格确认信息 */
.price-confirm {
    color: #666;
    font-size: 14px;
}

.final-price {
    font-size: 20px;
    color: #e1251b;
    font-weight: bold;
}

/* 提交按钮 */
.submit-btn {
    width: 140px;
    height: 48px;
    background: #e1251b;
    color: #fff;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    opacity: 0.9;
}

/* 添加地址弹窗样式 */
.address-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    color: #333;
}

.close-btn {
    font-size: 24px;
    color: #999;
    cursor: pointer;
}

.close-btn:hover {
    color: #666;
}

.modal-body {
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.form-item {
    margin-bottom: 30px;
    position: relative;
}

.form-item:last-child {
    margin-bottom: 20px;
}

.form-item.checkbox {
    margin-bottom: 20px;
}

.form-item label {
    display: inline-block;
    width: 100px;
    text-align: right;
    margin-right: 10px;
    color: #666;
}

.form-item input[type="text"],
.form-item input[type="tel"] {
    width: 300px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-item textarea {
    width: 300px;
    height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: none;
}

.area-select {
    display: inline-flex;
    gap: 10px;
    vertical-align: middle;
}

.area-select select {
    width: 120px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 10px;
}

.area-select select.error {
    border-color: #e1251b;
}

.area-select-errors {
    position: absolute;
    left: 110px;
    bottom: -20px;
    font-size: 12px;
    color: #e1251b;
}

.form-item.checkbox input[type="checkbox"] {
    margin-right: 5px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

.modal-footer button {
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
}

.btn-cancel {
    background: #fff;
    border: 1px solid #ddd;
    color: #666;
}

.btn-save {
    background: #e1251b;
    border: none;
    color: #fff;
}

.btn-cancel:hover {
    background: #f5f5f5;
}

.btn-save:hover {
    opacity: 0.9;
}

/* 表单验证错误样式 */
.form-item input.error,
.form-item textarea.error,
.form-item select.error {
    border-color: #e1251b;
}

.error-msg {
    position: absolute;
    left: 110px;
    bottom: -20px;
    color: #e1251b;
    font-size: 12px;
}

/* 地址操作按钮样式 */
.address-actions {
    position: absolute;
    right: 20px;
    bottom: 1px;
    z-index: 2;
}

.btn-edit {
    padding: 5px 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #666;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.btn-edit:hover {
    color: #e1251b;
    border-color: #e1251b;
}

/* 地址信息样式 */
.address-info {
    cursor: pointer;
    height: calc(100% - 30px); /* 减去编辑按钮的高度 */
}

/* 选中效果 */
.address-item.active::after {
    content: "√";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    background-color: #e1251b;
    color: #fff;
    font-size: 12px;
}

/* 确保地址项有相对定位 */
.address-item {
    position: relative;
} 